package com.christina.engine.routing.model;

import com.alibaba.fastjson.JSONObject;
import lombok.Builder;
import lombok.Data;
import java.util.Map;

/**
 * 路由决策模型
 * 包含路由决策的结果信息
 *
 * @author Christina
 */
@Data
@Builder
public class RoutingDecision {
    
    /**
     * 目标服务名称
     */
    private String targetService;
    
    /**
     * 执行参数
     */
    private Map<String, Object> executionParameters;
    
    /**
     * 决策置信度
     */
    private double confidence;
    
    /**
     * 决策理由
     */
    private String reasoning;
    
    /**
     * 创建默认的路由决策实例
     *
     * @param targetService 目标服务
     * @return RoutingDecision实例
     */
    public static RoutingDecision defaultDecision(String targetService) {
        return RoutingDecision.builder()
                .targetService(targetService)
                .confidence(0.5)
                .reasoning("使用默认路由策略")
                .build();
    }
}